package lolcodecompiler;

import java.util.Iterator;

public class MySemanticAnalyzer {

    public void convertToHtml()
    {
        LOLCodeCompiler.parseTree.stream().forEach((parseTree) -> {
            LOLCodeCompiler.html += convert(parseTree);
        });
    }

    private String convert(String lolTag)
    {
        for (Tags convertedTag : LOLCodeCompiler.allTags) 
        {
            if (convertedTag.lol.equalsIgnoreCase(lolTag))
            {
                return convertedTag.html;
            }
        }
        return  lolTag;
    }
}